package com.chen.pojo;


import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class Material {
    private Integer materialId; //物资id
    private  String materialName; //物资名称
    private  String materialSize; //物资大小
    private String materialBrand; //物资品牌
    private Integer materialCount; //物资数量
    @JsonFormat(pattern="yyyy-MM-dd", timezone="Europe/Zagreb")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date materialTime; //物资购买时间

    public Material() {
    }

    public Material(Integer materialId, String materialName, String materialSize, String materialBrand, Integer materialCount, Date materialTime) {
        this.materialId = materialId;
        this.materialName = materialName;
        this.materialSize = materialSize;
        this.materialBrand = materialBrand;
        this.materialCount = materialCount;
        this.materialTime = materialTime;
    }


    public Integer getMaterialId() {
        return materialId;
    }

    public void setMaterialId(Integer materialId) {
        this.materialId = materialId;
    }

    public String getMaterialName() {
        return materialName;
    }

    public void setMaterialName(String materialName) {
        this.materialName = materialName;
    }

    public String getMaterialSize() {
        return materialSize;
    }

    public void setMaterialSize(String materialSize) {
        this.materialSize = materialSize;
    }

    public String getMaterialBrand() {
        return materialBrand;
    }

    public void setMaterialBrand(String materialBrand) {
        this.materialBrand = materialBrand;
    }

    public Integer getMaterialCount() {
        return materialCount;
    }

    public void setMaterialCount(Integer materialCount) {
        this.materialCount = materialCount;
    }

    public Date getMaterialTime() {
        return materialTime;
    }

    public void setMaterialTime(Date materialTime) {
        this.materialTime = materialTime;
    }

    @Override
    public String toString() {
        return "Material{" +
                "materialId=" + materialId +
                ", materialName='" + materialName + '\'' +
                ", materialSize='" + materialSize + '\'' +
                ", materialBrand='" + materialBrand + '\'' +
                ", materialCount=" + materialCount +
                ", materialTime=" + materialTime +
                '}';
    }
}
